package com.idealighter.game.server.db.datadb.generate.mapper;

import com.idealighter.game.server.db.datadb.generate.domain.RoomCardPlayerRoundCountDomain;
import com.idealighter.game.server.db.datadb.generate.domain.RoomCardPlayerRoundCountDomainExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface RoomCardPlayerRoundCountDomainMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @SelectProvider(type=RoomCardPlayerRoundCountDomainSqlProvider.class, method="countByExample")
    long countByExample(RoomCardPlayerRoundCountDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @DeleteProvider(type=RoomCardPlayerRoundCountDomainSqlProvider.class, method="deleteByExample")
    int deleteByExample(RoomCardPlayerRoundCountDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Delete({
        "delete from room_card_player_round_count",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Insert({
        "insert into room_card_player_round_count (player_id, count)",
        "values (#{playerId,jdbcType=BIGINT}, #{count,jdbcType=INTEGER})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insert(RoomCardPlayerRoundCountDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @InsertProvider(type=RoomCardPlayerRoundCountDomainSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insertSelective(RoomCardPlayerRoundCountDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @SelectProvider(type=RoomCardPlayerRoundCountDomainSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="count", property="count", jdbcType=JdbcType.INTEGER)
    })
    List<RoomCardPlayerRoundCountDomain> selectByExample(RoomCardPlayerRoundCountDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Select({
        "select",
        "id, player_id, count",
        "from room_card_player_round_count",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="count", property="count", jdbcType=JdbcType.INTEGER)
    })
    RoomCardPlayerRoundCountDomain selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @UpdateProvider(type=RoomCardPlayerRoundCountDomainSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") RoomCardPlayerRoundCountDomain record, @Param("example") RoomCardPlayerRoundCountDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @UpdateProvider(type=RoomCardPlayerRoundCountDomainSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") RoomCardPlayerRoundCountDomain record, @Param("example") RoomCardPlayerRoundCountDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @UpdateProvider(type=RoomCardPlayerRoundCountDomainSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(RoomCardPlayerRoundCountDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_player_round_count
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Update({
        "update room_card_player_round_count",
        "set player_id = #{playerId,jdbcType=BIGINT},",
          "count = #{count,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(RoomCardPlayerRoundCountDomain record);
}